/**
 * Created by cz on 2017/5/3.
 */
import React,{Component} from "react";
import {
    View,
    Image,
    Text,
    TouchableOpacity,
    StyleSheet,
}from "react-native"
import NavigatorBar from "./js/common/NavigatorBar";
export default class Girl extends Component{
    constructor(props){
        super(props);
        this.state={

        }
    }
    renderButton(image){
        return <TouchableOpacity onPress={()=>{
            this.props.navigator.pop();
           }
           }>
            <Image style={{width:22,height:22,margin:5}} source={image}></Image>
        </TouchableOpacity>
    }
    render(){
        return (
            <View style={styles.container}>
                <NavigatorBar
                    title={"Girl"}
                    style={{backgroundColor:"#FFC1C1"}}
                    leftButton={
                       this.renderButton(require("./img/back.png"))
                    }

                    rightButton={
                       this.renderButton(require("./img/shoucang.png"))
                    }
                />
                <Text style={styles.text}>I am Girl</Text>
                <Text style={styles.text}>{this.props.word}</Text>
                <Text style={styles.text} onPress={()=>{
                    this.props.onCallBack("收到一盒巧克力");
                    this.props.navigator.pop();
                }}>回赠送男孩巧克力</Text>
            </View>
        )
    }
}
const styles = StyleSheet.create({
    container:{
        flex:1,
        backgroundColor:"#fff"
    },
    text:{
        fontSize:20
    }
});